#ifndef GLUTPROJECT_H
#define GLUTPROJECT_H
#include <cstdlib>
#include <GL/glut.h>
#include <string>
using namespace std;

namespace bend2d
{
    class GlutProject
    {
        public:
            GlutProject();
            void Init(int argc, char* argv[]);
            void MainLoop();
            void RenderFunction();
            void SwapBuffers();
            
            virtual void CustomInit();
            virtual void ClearFunction();
            virtual void CustomRenderFunction();
            virtual void CustomIdleFunction();
            virtual void CustomMouseFunction(int button, int state, int x, int y);
            virtual void CustomKeyboardFunction(unsigned char key, int x, int y);
            virtual void SetOrtho();
            virtual void GetWindowSize(int& width, int& height);
            virtual void GetWindowName(string& windowname);

            // Functions //
            static void DrawText(double x, double y, const string& text);
        private:

            static void _RenderFunction();
            static void _IdleFunction();
            static void _MouseFunction(int button, int state, int x, int y);
            static void _KeyboardFunction(unsigned char key, int x, int y);
            static GlutProject* _Pointer;
    };
}

#endif

